home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6087 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: magnus.acs.ohio-state.edu!mail-news-gateway
  2. From: xiaoyi@mozart.bme.ohio-state.edu (Xiaoyi Wu)
  3. Newsgroups: comp.windows.x,comp.lang.c
  4. Subject: get text strings from keyboard
  5. Date: 22 Feb 1996 11:55:38 -0500
  6. Organization: The Ohio State University
  7. Sender: root@magnus.acs.ohio-state.edu
  8. Message-ID: <Pine.SGI.3.91.960222115042.25886A-100000@mozart.bme.ohio-state.edu>
  9. NNTP-Posting-Host: charm.magnus.acs.ohio-state.edu
  10.  
  11. Hi, I am a newbie in X programming (X lib right now, no motif) and need 
  12. some help on this:
  13.  
  14. I need to get a few numbers from the user in a window, is there a 
  15. function available for that purpose? what i am doing now is use KeyPress 
  16. mask to detect keyboard inputs, and i think i must be missing somehting 
  17. here since although XLookupString claims to fill a string buffer i am 
  18. only getting ONE character at a time.
  19.  
  20. the portion of code looks like this:
  21.  
  22.         case KeyPress: 
  23.           res = XLookupString(&myevent,text,100,&mykey,0); 
  24.           printf("res=%d, text=%s\n",res,text); 
  25.           break; 
  26.  
  27.  
  28. thanks for any help.
  29.  
  30. Xiaoyi
  31.